
package jpoco.client;

public class Relationship implements java.io.Serializable
{
	private String value;
	
	public Relationship(String r)
	{
		super();
		this.setValue(r);
	}
	
	public void setValue(String v)
	{
		this.value = v.trim();
	}

	public String getValue()
	{
		return this.value;
	}
	
	public boolean isColleague()
	{
		return "colleague".equalsIgnoreCase(this.value);
	}

	public boolean isBrother()
	{
		return "brother".equalsIgnoreCase(this.value);
	}

	public boolean isSister()
	{
		return "sister".equalsIgnoreCase(this.value);
	}

	public boolean isSon()
	{
		return "son".equalsIgnoreCase(this.value);
	}

	public boolean isDaughter()
	{
		return "daughter".equalsIgnoreCase(this.value);
	}

	public boolean isKin()
	{
		return "kin".equalsIgnoreCase(this.value)
				|| isAunt()
				|| isUncle()
				|| isBrother()
				|| isSister()
				|| isParent()
				|| isSon()
				|| isDaughter()
				|| isGrandParent();
	}

	public boolean isUncle()
	{
		return "uncle".equalsIgnoreCase(this.value);
	}

	public boolean isAunt()
	{
		return "aunt".equalsIgnoreCase(this.value);
	}

	public boolean isParent()
	{
		return "parent".equalsIgnoreCase(this.value);
	}
	
	public boolean isGrandParent()
	{
		return "grandparent".equalsIgnoreCase(this.value);
	}
	
	public boolean isFriend()
	{
		return "friend".equalsIgnoreCase(this.value);
	}
	
	public boolean isSpouse()
	{
		return "spouse".equalsIgnoreCase(this.value)
				|| isWife()
				|| isHusband();
	}
	
	public boolean isSignificantOther()
	{
		return "significantother".equalsIgnoreCase(this.value)
						|| isSpouse();
	}
	
	public boolean isWife()
	{
		return "wife".equalsIgnoreCase(this.value);
	}
	
	public boolean isHusband()
	{
		return "husband".equalsIgnoreCase(this.value);
	}
	
	public String toString()
	{
		return String.valueOf(this.value);
	}

	
}
